/**
 *******************************************************************************
 * @FileName  : os_support.c
 * @Author    : GaoQiu
 * @CreateDate: 2020-05-18
 * @Copyright : Copyright(C) GaoQiu
 *              All Rights Reserved.
 *******************************************************************************
 *
 * The information contained herein is confidential and proprietary property of
 * GaoQiu and is available under the terms of Commercial License Agreement
 * between GaoQiu and the licensee in separate contract or the terms described
 * here-in.
 *
 * This heading MUST NOT be removed from this file.
 *
 * Licensees are granted free, non-transferable use of the information in this
 * file under Mutual Non-Disclosure Agreement. NO WARRENTY of ANY KIND is provided.
 *
 *******************************************************************************
 */

#include "track.h"
#include "mdc.h"
#include "platform/platform.h"

#ifdef OS_EN
int OS_GiveSemphCback(void)
{
#ifdef IP_108
	NVIC_SetPendingIRQ(TRIM_IRQn);
	NVIC_EnableIRQ(TRIM_IRQn);

#elif defined(IP_107)
	NVIC_SetPendingIRQ(TMR2_IRQn);
	NVIC_EnableIRQ(TMR2_IRQn);
#endif

	return 0;
}

#ifdef IP_108
RAM_CODE void TRIM_IRQHandler(void)
#elif defined(IP_107)
RAM_CODE void TMR2_IRQHandler(void)
#endif
{
	DBG_CHN11_HI

	MDC_Start();

	DBG_CHN11_LO
}

//MDC_RegisterSemphrCback(MDC_GiveSemphCback);
#endif
